// 首页
var serviceSwiper;
var guessYourLikeSwiper;
var optimizationShops;
var Index = {};
$(function(){
  $(".left-menu-list>li").mouseenter(function(){
    $(this).addClass("active").siblings().removeClass("active");
    $(".left-menu-content").show();
  }).mouseleave(function(){
	  $(".left-menu-content").hide();   
  });
  $(".qm-content-left-menu").mouseleave(function(){
	  if($(".left-menu-content").is(':hidden')){
		  $(".left-menu-list>li").removeClass("active");		  
	  }
  });
	$(".left-menu-content").mouseenter(function(){
	  $(this).show();
	}).mouseleave(function(){
	  $(this).hide();
	});
  $("#qrCode").hover(function(){
		$(".qm-weixin-qr-code").show().addClass("animated fadeInDown");
	},function(){
		$(".qm-weixin-qr-code").hide().removeClass("animated fadeInDown");
	});
  var mySwiper = new Swiper('.swiper-container', {
	autoplay:{
		delay: 2000,
	    disableOnInteraction: false,
	},//可选选项，自动滑动
  pagination: {
      el: '.swiper-pagination',
    },
    loop : true,
    // 如果需要前进后退按钮
    navigation: {
      nextEl: '.swiper-button-next',
      prevEl: '.swiper-button-prev',
    },
    pagination :{
        el: '.swiper-pagination',
        clickable :true,
      }
});
  //优质服务
   serviceSwiper = new Swiper('.goodsService',{
	  autoplay:{
		  delay: 2000,
	      disableOnInteraction: false,
	  },
	  loop : true,
  });
//猜你喜欢
   guessYourLikeSwiper = new Swiper('.guessYourLike',{
	  autoplay: false,
	  loop : true,
  });
   //优选商铺
   optimizationShops = new Swiper('.optimizationShops',{
		  autoplay: false,
		  loop : true,
	  });
   new Swiper('.imgCheck',{
	  autoplay: false,
		  loop : false 
   });
   new Swiper('.imgShare',{
		  autoplay: false,
			  loop : false 
	   });
});


Index.changeGoodsService = function(){
	serviceSwiper.slideNext();
}
Index.changeGuessYourLike = function(){
	guessYourLikeSwiper.slideNext();
}
Index.changeOptimizationShops = function(){
	optimizationShops.slideNext();
}